libxl: fix fd check in libxl__spawn_local_dm
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 22 Nov 2013 11:54:08 +0000 (12:54 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 26 Nov 2013 10:55:34 +0000 (10:55 +0000)
commit3b88d95e9c0a5ff91d5b60e94d81f1982af57e7f
treeebe156112ad5cbf3e86d6d25f58a151d167d30fb
parentdffc22a15850ffc943069a2ab38a2d0234e2df00
libxl: fix fd check in libxl__spawn_local_dm

Checking the logfile_w fd for -1 on failure is no longer true, because
libxl__create_qemu_logfile will now return ERROR_FAIL on failure which
is -3.

While there also add an error check for opening /dev/null.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libxl/libxl_dm.c